home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-27 | 1.3 KB | 52 lines | [TEXT/KAHL] |
- /* Tutorial SC Demonstration Program */
- /* ©FaceWare 1993. All Rights Reserved. */
-
- #include <string.h>
- #include "FaceStorSC.h"
- extern struct FaceRec fRec;
-
- short theFlag,theListItem,theMenuItem;
- char theString[32];
-
- void main()
- {
- strcpy(fRec.uName, "Tutorial.Rsrc");
- FaceIt(0,DoInit);
- theFlag = 0;
- theListItem = 3;
- theMenuItem = 2;
- strcpy(theString,"Hello");
- for (;;) {
- FaceIt(0,DoLoop);
- if ((fRec.uMenuID == 105)&&(fRec.uMenuItem == 1))
- {
- FaceIt(0,NewWnd,1010);
- FaceIt(0,GetCtl,1010,0,1,3);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theFlag,2);
- FaceIt(0,GetCtl,1010,0,1,4);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)theString,-31);
- FaceIt(0,GetCtl,1010,0,1,5);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theListItem,2);
- FaceIt(0,GetCtl,1010,0,1,6);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theMenuItem,2);
- FaceIt(0,SetVal,1010);
- for (;;) {
- FaceIt(0,MdlWnd,1010);
- if (fRec.uMenuID == 1010) {
- if (fRec.wcHit == -1)
- break;
- else if (fRec.wcHit == 1) {
- FaceIt(0,GetVal,1010);
- break;
- }
- else if (fRec.wcHit == 2) {
- FaceIt(0,GetCtl,1010,0,1,8);
- strcpy(fRec.uString,"Run button was hit.");
- FaceIt(fRec.cControl,1565,2);
- }
- }
- }
- FaceIt(0,EndWnd,1010);
- }
- }
- }